<h1 class="pagetitle"><?php echo $title;?></h1>
<div class="column1-unit">
	<table id="entitylist" class="entitylist" summary="<?php echo $title; ?>" cellspacing="0">
		<thead>
			<tr>
				<?php
					foreach($columns as $column){
				?>		
					<th class="top" scope="col"><?php echo $column;?></th>
				<?php 		
					} 
				?>
	                    <th class="top" scope="col">&nbsp;</th>
	            </tr>
		</thead>
		<tbody>
			<?php
				foreach($rows as $row){
			?>
				<tr>
					<?php
						for($i=0; $i< count($row)-1;$i++){
							if ($i==0) echo "<th scope=\"row\">$row[$i]</th>";
							elseif ($i==2) echo "<td style='text-align:right;'>$row[$i]</td>";
							else	   echo "<td>$row[$i]</td>"; 
						} 
					?>
					<td><a class="entity-edit" href="<?php echo "#".$row[count($row)-1]; ?>">Detalles</a></td>
				</tr>
			<?php
			 	}
			?>
		
		</tbody>
		<tfoot>
			
		</tfoot>
	</table>
	<p class="caption"><strong>Tabla 1.1.</strong> <?php echo $title;?></p>
	<div id="pagination" style="float:right;margin-right:7em;">
		<?php echo $pagination_links;?>
	</div>	
</div>
          
<hr class="clear-contentunit" />
<script type="text/javascript">
	Diastole.decorate("div.newentity a","#context");
	Diastole.decorateRequest("#entitylist a.entity-edit","rawsignal/details","div.main-content");

	$j("p.pagination a").click(function(){
		$j("div.main-content").load(this.href);
		return false;
	});
	
</script>
